﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using RBAC.DAL.Entities;

namespace RBAC.DAL.Mappers
{
	public class FunctionMap : ClassMap<Function>
    {
		public FunctionMap()
		{
			Id(x => x.Id);
							
													Map(x => x.FuncName).Not.Nullable()						.Length(255)						.UniqueKey("UQ_Function_FuncName");			
					
													Map(x => x.Description).Not.Nullable()						.Length(255)						;			
					
													References(x => x.Domain).Cascade.All();
					
													Map(x => x.FunctionStatus).Not.Nullable()												;			
					
													Map(x => x.FunctionName).Not.Nullable()												;			
					
													References(x => x.DomainLookup).Cascade.All();
					
					}

	}
}